<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Data-Table 表格</title>
    <link rel="stylesheet" href="../../frame/layui/css/layui.css">
    <link rel="stylesheet" href="../../frame/static/css/style.css">
    <link rel="stylesheet" href="../../css/common.css">

</head>
<body>
<div class="layui-col-md12">
    <input type="file" id="inputId" name="img" style="display: none" onchange="imgPut('inputId','putImg','showImg','admin/BannerFile')">
    <form  url="admin/CommonSet" method="post" id="ajaxForm">
        <div class="middle" style="text-align: center;margin-top: 20px">
            <input type="hidden" name="id" value="" >
            <input name="content" id="putImg" type="hidden">
            <div>
                <img id="showImg" onclick="$('#inputId').click()" src="../../img/loading.gif" style="width: 300px;height:300px">
            </div>

            <div class="layui-form" >
                <div class="layui-form-item" style="overflow: hidden;">
                    <div class="layui-input-block layui-input-right" style="margin-left:0;margin-top: 20px">
                        <a class="layui-btn" id="ajax-btn">修改</a>
                    </div>
                </div>
            </div>
        </div>

    </form>

</div>
<script src="../../js/public/jquery-3.1.1.min.js"></script>
<script src="../../js/layer/layer.js"></script>
<script src="../../js/public/common.js"></script>
<script>
    $(function(){
        GetDetail();
    });
    function GetDetail(){
        let id = GetQueryString('id');
        let data = AjaxForm('admin/CommonDetail','get',{id:id});
        $('input[name="content"]').val(data.content);
        $('#showImg').attr('src',data.content);
        $('input[name="id"]').val(data.id);
    }
</script>
</body>
</html>